{template 'common/header-base'}
<style>
	body{
		background: url('themes/qincewang/user/001.jpg');
		background-repeat:no-repeat;
		background-size:cover;
	}
	.bg-white{
		  background-color: rgba(255, 255, 255, 0.81);
	}
	.text-muted {
  color: #7B7878;
}
</style>
<script>
	$('#form1').submit(function(){
		if($.trim($(':text[name="username"]').val()) == '') {
			util.message('没有输入用户名.', '', 'error');
			return false;
		}
		if($('#password').val() == '') {
			util.message('没有输入密码.', '', 'error');
			return false;
		}
		if($('#password').val() != $('#repassword').val()) {
			util.message('两次输入的密码不一致.', '', 'error');
			return false;
		}
/* 		{loop $extendfields $item}
		{if $item['required']}
			if (!$.trim($('[name="{$item['field']}"]').val())) {
				util.message('{$item['title']}为必填项，请返回修改！', '', 'error');
				return false;
			}
		{/if}
		{/loop}
		*/		{if $setting['register']['code']}
		if($.trim($(':text[name="code"]').val()) == '') {
			util.message('没有输入验证码.', '', 'error');
			return false;
		}
		{/if}
	});

</script>

<div class="bg-white pulldown">
	<div class="content content-boxed overflow-hidden">
		<div class="row">
			<div class="col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4" style="padding-right: 30px;
  padding-left: 30px;">
				<div class="push-10-t push-10 animated fadeIn">

					<div class="text-center">
						<a href="./?refresh" {if !empty($_W['setting']['copyright']['flogo'])}style="background:url('{php echo tomedia($_W['setting']['copyright']['flogo']);}') no-repeat;height:34px;display:block;
						background-position:center;"{else}style="background: url('resource/qincewang/img/gw-logo.png') no-repeat;height:34px;display:block;
						background-position:center;"{/if}></a>

						<p class="text-muted push-5-t">微擎-免费开源的微信公众平台管理系统</p>
					</div>

					<form class="form-horizontal push-5-t" action="" method="post" role="form" id="form1">
						<div class="form-group">
							<label>用户名<span style="color:red">*</span></label>

							<input class="form-control" type="text" id="register1-username" name="username" placeholder="请输入用户名">

						</div>
						<div class="form-group">
							<label>密码<span style="color:red">*</span></label>

							<input class="form-control" type="password" id="password" name="password" placeholder="请输入密码">

						</div>
						<div class="form-group">
							<label>确认密码<span style="color:red">*</span></label>

							<input class="form-control" type="password" id="repassword" name="password" placeholder="请再次输入密码">

						</div>
						{if $extendfields}
						{loop $extendfields $item}
						<div class="form-group">
							<label>{$item['title']}：{if $item['required']}<span style="color:red">*</span>{/if}</label>
							{php echo tpl_fans_form($item['field'])}
						</div>
						{/loop}
						{/if}
						{if $setting['register']['code']}
						<div class="form-group">
							<label style="display:block;">验证码:<span style="color:red;">*</span></label>
							<input name="code" type="text" class="form-control" placeholder="请输入验证码" style="width:65%;display:inline;margin-right:17px">
							<img src="{php echo url('utility/code');}" class="img-rounded" style="cursor:pointer;" onclick="this.src='{php echo url('utility/code');}' + Math.random();" />
						</div>
						{/if}

						<div class="form-group">
							<div style="text-align: right;">
								<input class="btn btn-sm btn-primary" type="submit" name="submit" value="注 册">
								<a href="{url 'user/login'}" class="btn btn-sm btn-primary">登 录</a>
								<input name="token" value="{$_W['token']}" type="hidden" />
							</div>
						</div>
					</form>

				</div>
			</div>
		</div>
	</div>
</div>

<div class="pulldown push-30-t text-center animated fadeInUp">
	<small class="text-muted">{if empty($_W['setting']['copyright']['footerleft'])}Powered by <a href="http://www.we7.cc"><b>微擎</b></a> v{IMS_VERSION} &copy; 2014-2015 <a href="http://www.we7.cc">www.we7.cc</a>{else}{$_W['setting']['copyright']['footerleft']}{/if}</small>
</div>

<script>
	function formcheck() {
		if($('#remember:checked').length == 1) {
			cookie.set('remember-username', $(':text[name="username"]').val());
		} else {
			cookie.del('remember-username');
		}
		return true;
	}
</script>

<script src="./resource/qincewang/js/animations.js"></script>

</body>
</html>